/*
 * FaceCat图形通讯框架(非开源)
 * 著作权编号:2015SR229355+2020SR0266727
 * 上海卷卷猫信息技术有限公司
 */

#include "stdafx.h"
#include "CYears.h"

namespace FaceCat{
    CYears::CYears(){
    }
    
    CYears::~CYears(){
        for(int i = 0; i < Years.size(); i++){
            CYear *year = Years.getValue(i);
            delete year;
        }
        Years.clear();
    }
    
    CYear* CYears::getYear(int year){
        CYear *cy = 0;
        if(!Years.containsKey(year)){
            cy = new CYear(year);
            Years.put(year, cy);
        }
        else{
            cy = Years.get(year);
        }
        return cy;
    }
}
